﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;

namespace JCTimes.Portal.Models {
    public class ChangePassword {
        //[HiddenInput]
        //public string UserID { get; set; }

        //[Display(Name = "用户名：")]
        //[DataType(DataType.Text)]
        //public string UserName { get; set; }

        [Required(ErrorMessage="*")]
        [DataType(DataType.Password)]
        [Display(Name = "原密码：")]
        public string OldPassword { get; set; }

        [Required(ErrorMessage = "*")]
        [DataType(DataType.Password)]
        [StringLength(20, ErrorMessage = "长度必须大于{2}", MinimumLength = 2)]
        [Display(Name = "新密码：")]
        public string NewPassword { get; set; }

        
        [DataType(DataType.Password)]
        [Display(Name = "确认新密码：")]
        [Compare("NewPassword", ErrorMessage = "两次密码输入不一致!")]
        public string ConfirmPassword { get; set; }
    }
}